<script setup>
const props = defineProps({
  info: String,
  money: Number
})


const updateProps = () => {
  props.money += 10
}

</script>

<template>
  <div class="son1">
    <h1>我是子组件</h1>
    <p>{{ info }}</p>
    <p>{{ money }}</p>
    <button @click="updateProps()">修改父组件的money属性</button>
  </div>
</template>

<style scoped>
.son1 {
  width: 400px;
  height: 200px;
  background-color: hotpink;
}
</style>
